/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package proliferacion.logica;

import java.beans.PropertyChangeSupport;

/**
 *
 * @author ingesis
 */
public class Vertice {

    public static final String PROP_ID = "PROP_ID";
    public static final String PROP_COMPONENTEX = "PROP_COMPONENTEX";
    public static final String PROP_COMPONENTEY = "PROP_COMPONENTEY";
    private int Id;
    private int componenteX;
    private int componenteY;
    private final transient PropertyChangeSupport propertyChangeSupport = new java.beans.PropertyChangeSupport(this);

    public Vertice() {
        Id = 0;
        componenteX = 20;
        componenteY = 50;
    }

    public Vertice(int Id, int componenteX, int componenteY) {
        this.Id = Id;
        this.componenteX = componenteX;
        this.componenteY = componenteY;
    }

    /**
     * @return the Id
     */
    public int getId() {
        return Id;
    }

    /**
     * @param Id the Id to set
     */
    public void setId(int Id) {
        int oldId = Id;
        this.Id = Id;
        propertyChangeSupport.firePropertyChange(PROP_ID, oldId, Id);
    }

    /**
     * @return the componenteX
     */
    public int getComponenteX() {
        return componenteX;
    }

    /**
     * @param componenteX the componenteX to set
     */
    public void setComponenteX(int componenteX) {
        int oldComponenteX = componenteX;
        this.componenteX = componenteX;
        propertyChangeSupport.firePropertyChange(PROP_COMPONENTEX, oldComponenteX, componenteX);
    }

    /**
     * @return the componenteY
     */
    public int getComponenteY() {
        return componenteY;
    }

    /**
     * @param componenteY the componenteY to set
     */
    public void setComponenteY(int componenteY) {
        int oldComponenteY = componenteY;
        this.componenteY = componenteY;
        propertyChangeSupport.firePropertyChange(PROP_COMPONENTEY, oldComponenteY, componenteY);
    }
}
